<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
</head>
<body>
    <h1>这是H1标签</h1>
    <h1>这是H1标签</h1>
    <h1>这是H1标签</h1>
</body>
<script>
    //通过标签选择器选择H1标签
    let e1=document.querySelector('h1');
    //打印h1的内容
    console.log(e1);
    console.log("==========================");
    console.dir(e1);
    console.log("============================");
    //查找页面的多个元素
    let es=document.querySelectorAll('h1');
    console.log(es);
    console.log(es.length);
</script>
</html>